package com.hertz.iris.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.hertz.iris.util.Utils;

public class ConnectivyBroadcastReceiver extends BroadcastReceiver {
	
	private View networkBanner;
	
	public ConnectivyBroadcastReceiver(View v){
		super();
		networkBanner = v;
	}

	@Override   
	public void onReceive(Context context, Intent intent) {
		boolean result = Utils.checkNetwork(context);
		
		if (result) {
			networkBanner.setVisibility(View.GONE);
		}else{
			networkBanner.setVisibility(View.VISIBLE);
		}
	}

}
